
#pragma OPENCL EXTENSION cl_khr_local_int32_extended_atomics : enable
#pragma OPENCL EXTENSION cl_khr_global_int32_extended_atomics : enable

// 13. Reduce work-group min values from __global to __global.

__kernel void minMaxReduceP( __global uint *gresult )
{
 int idx = 2 * get_global_id(0);
 (void) atom_min( gresult, gresult[idx] ) ;
 (void) atom_max( gresult + 1, gresult[idx + 1] ) ;
}


